package cn.liasoux.controller;

import cn.liasoux.common.Mail;
import cn.liasoux.mapper.MsgLogMapper;
import cn.liasoux.utils.ProducerUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/email")
public class EmailController {


    @Autowired
    MsgLogMapper msgLogMapper;

    @Autowired
    ProducerUtil producerUtil;


    @PostMapping
    public Mail sendEmail(@RequestBody Mail mail){
        producerUtil.sendEmail(mail);
        return null;
    }
}
